package cn.home.resident.service.impl;

import java.util.List;

import cn.home.resident.domain.HomeChat;
import cn.home.resident.mapper.HomeChatMapper;
import cn.home.resident.service.IHomeChatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 聊天Service业务层处理
 * 
 * @author homedoctor
 * @date 2025-04-14
 */
@Service
public class HomeChatServiceImpl implements IHomeChatService
{
    @Autowired
    private HomeChatMapper homeChatMapper;

    /**
     * 查询聊天
     * 
     * @param id 聊天主键
     * @return 聊天
     */
    @Override
    public HomeChat selectHomeChatById(Long id)
    {
        return homeChatMapper.selectHomeChatById(id);
    }

    /**
     * 查询聊天列表
     * 
     * @param homeChat 聊天
     * @return 聊天
     */
    @Override
    public List<HomeChat> selectHomeChatList(HomeChat homeChat)
    {
        return homeChatMapper.selectHomeChatList(homeChat);
    }

    /**
     * 新增聊天
     * 
     * @param homeChat 聊天
     * @return 结果
     */
    @Override
    public int insertHomeChat(HomeChat homeChat)
    {
        return homeChatMapper.insertHomeChat(homeChat);
    }

    /**
     * 修改聊天
     * 
     * @param homeChat 聊天
     * @return 结果
     */
    @Override
    public int updateHomeChat(HomeChat homeChat)
    {
        return homeChatMapper.updateHomeChat(homeChat);
    }

    /**
     * 批量删除聊天
     * 
     * @param ids 需要删除的聊天主键
     * @return 结果
     */
    @Override
    public int deleteHomeChatByIds(Long[] ids)
    {
        return homeChatMapper.deleteHomeChatByIds(ids);
    }

    /**
     * 删除聊天信息
     * 
     * @param id 聊天主键
     * @return 结果
     */
    @Override
    public int deleteHomeChatById(Long id)
    {
        return homeChatMapper.deleteHomeChatById(id);
    }
}
